package com.lintpanzer.parser
{
	import com.asfusion.mate.events.Dispatcher;
	import com.lintpanzer.events.ValidationEvent;
	import com.lintpanzer.vo.Options;
	import com.lintpanzer.vo.ScriptError;
	import com.lintpanzer.vo.ScriptWarning;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;

	public class LintParser extends EventDispatcher
	{
		protected var dispatcher:Dispatcher;
		
		public var options:Options;
		
		public function LintParser(){
			dispatcher = new Dispatcher();
		}
		
		override public function dispatchEvent(event:Event):Boolean{
			return super.dispatchEvent(event) && dispatcher.dispatchEvent(event);
		}
		
		public function doValidation(fileSource:String):void{
			/**
			 * Example validation response.
			 * scriptErrors is an array of ScriptError objects.
			 * scriptWarnings is an array of ScriptWarning objects.
			**/
			/**
			 * var scriptErrors:Array = new Array();
			 * var scriptWarnings:Array = new Array();
			 * var ve:ValidationEvent = new ValidationEvent(ValidationEvent.COMPLETE);
			 * ve.scriptErrors = scriptErrors;
			 * ve.scriptWarnings = scriptWarnings;
			 * dispatchEvent(ve);
			**/
		}
	}
}